package com.goldenKey.common.pojo.enumeration;

/**
 * 申请表状态
 */
public enum ApplicationStatusEnum {

    REVIEWED(0, "待审核"),
    PASSED(1, "已通过"),
    COMPLETED(2, "已完成"),
    CANCELED(3, "已取消"),
    NO_PASS(-1, "不通过");


    private Integer status;
    private String desc;

    ApplicationStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static ApplicationStatusEnum getByStatus(Integer status) {
        for(ApplicationStatusEnum item : ApplicationStatusEnum.values()) {
            if(item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return this.status;
    }
    public String getDesc() {
        return this.desc;
    }
}
